﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NetManager_Server;

namespace NetManager_Server.Classes
{
    public class Client
    {
        private string name;
        private string ip;
        private string mac;
        private string status;
        private DateTime startTime;
        private DateTime endTime;

        public Client()
        {
        }

        public string Name { get { return name; } set { name = value; } }
        public string IP { get { return ip; } set { ip = value; } }
        public string MAC { get { return mac; } set { mac = value; } }
        public string Status { get { return status; } set { status = value; } }
        public DateTime StartTime { get { return startTime; } set { startTime = value; } }
        public DateTime EndTime { get { return endTime; } set { endTime = value; } }
        
        public string UseTime 
        { 
            get 
            {
                TimeSpan ts = endTime - startTime;
                return new DateTime(ts.Ticks).ToString("HH:mm:ss");
            } 
        }

        public double Money
        {
            get
            {
                TimeSpan ts = endTime - startTime;
                return ts.Minutes * (Program.price/60);
            }
        }
    }
}
